package com.retail.system.service.impl;

import com.retail.core.entity.ParamReq;
import com.retail.system.entity.request.IconRequest;
import com.retail.system.entity.vo.IconVo;
import com.retail.system.mapper.IconMapper;
import com.retail.system.service.IconService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Administrator
 */
@Service
public class IconServiceImpl implements IconService {

    @Resource
    private IconMapper iconMapper;

    @Override
    public IconVo getModel(Long id) {
        return iconMapper.getModel(id);
    }

    @Override
    public Long save(IconRequest icon) {
        iconMapper.save(icon);
        return icon.getId();
    }

    @Override
    public Long update(IconRequest icon) {
        iconMapper.update(icon);
        return icon.getId();
    }

    @Override
    public List<IconVo> listPage(ParamReq<IconRequest> params) {
        return iconMapper.listPage(params);
    }

    @Override
    public Integer countPage(ParamReq<IconRequest> params) {
        return iconMapper.countPage(params);
    }

    @Override
    public Integer updateDelFlagById(Long id, Integer delFlag) {
        return iconMapper.updateDelFlagById(id, delFlag);
    }

}
